<template>
    <div class="background-img">
        <img src="../assets/img/个人主页背景图.jpg" alt="">
    </div>
    <div class="my-nav">
        <ul>
            <li><router-link to="/" class="home-link">首页</router-link></li>
            <li><router-link to="/News">新闻</router-link></li>
            <li><router-link to="/Products">产品介绍</router-link></li>
            <li><router-link to="/Audiovisual">视听站</router-link></li>
            <li><a href="https://codelover.club/qb/votepublic?voteID=13">我的gitee仓库</a></li>
        </ul>
    </div>
    <div class="content-wrapper">
        <div class="info">
            <div class="time">
                {{ currentTime }}
            </div>
            <div class="date">
                {{ currentDate }}
            </div>
        </div>

        <div class="My-profile">
            <div class="My-profile-header">
                <h1 class="My-name">欧阳富贵</h1>
            </div>
            <div class="My-item">
                <div>
                    <span>未来可期，再接再厉</span>
                </div>
                <div>
                    <a href="https://codelover.club/qb/votepublic?voteID=13">求求❀投投孩子195号</a>
                    <text>orz</text>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'My',
    data() {
        return {
            currentTime: '',
            currentDate: ''
        };
    },
    mounted() {
        this.updateTime();
        setInterval(this.updateTime, 1000);
    },
    methods: {
        updateTime() {
            const now = new Date();
            this.currentTime = now.toLocaleTimeString();
            this.currentDate = now.toLocaleDateString();
        }
    }
};
</script>

<style scoped>
body {
    margin: 0;
    font-family: 'Arial, sans-serif';
    background-color: #f0f8ff;
}

.background-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('../assets/img/个人主页背景图.jpg') no-repeat center center fixed;
    background-size: cover;
}

.my-nav {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 10px;
}

.my-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.my-nav li {
    display: inline;
    margin: 0 10px;
}

.my-nav a {
    text-decoration: none;
    color: #007acc;
    font-size: 18px;
}

.my-nav a:hover {
    color: #005f99;
}

.content-wrapper {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    left: 500px;
}

.info {
    margin: 20px 0;
}

.time,
.date {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 50px;
    color: #007acc;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin-top: 10px;
}

.date {
    margin-top: 5px;
}

.buttom {
    margin: 20px 0;
}

.icon-button {
    font-size: 30px;
    color: #007acc;
    margin: 0 10px;
    text-decoration: none;
}

.icon-button:hover {
    color: #005f99;
}

.My-profile {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.My-profile-header {
    margin-bottom: 20px;
}

.My-name {
    font-size: 28px;
    color: #007acc;
}

.My-item span {
    display: block;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.My-item a {
    color: #007acc;
    text-decoration: none;
    font-size: 18px;
}

.My-item text {
    font-size: 24px;
    color: #007acc;
    margin-left: 10px;
}

.My-item a:hover {
    text-decoration: underline;
}
</style>
